<?
//地区码的JSON格式
include_once '/var/www/html/new/com.inc.php';
$sql = "select * from pft_area_code_concat";
$GLOBALS['le']->query($sql);
$r=array();
while($row = $GLOBALS['le']->fetch_assoc()){
    $s_code=explode("|",$row['s_code']);
    $r[$s_code[0]]['province']=$row['province'];
    $r[$s_code[0]]['code']=$s_code[0];
    $r[$s_code[0]]['city'][$row['n_code']]=$row['city'];
}
//$filename = '/var/www/html/wx/api/data/city.php';
//file_put_contents($filename,"<?php\n return " . var_export($r, true) .";" );
// print_r($r);
print_r(json_encode($r));
?>